package search;
/**
 * Write a description of interface SearchSpace here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */

//public interface SearchSpace<State, Transition, N extends GraphNode<State>, E extends GraphEdge<Transition, N>> extends Graph<State,Transition,N,E>
public class SearchNode<N extends GraphNode<?>>
{
    private N state;
    private SearchNode<N> parent;
    private double cost;
    private int depth;
    
    public SearchNode(N state, SearchNode<N> parent,double cost, int depth)
    {
        this.state = state;
        this.parent = parent;
        this.cost = cost;
        this.depth = depth;
    }
    
    public N getData()
    {
        return state;
    }
    
    public N getState()
    {
        return state;
    }
    
    public SearchNode<N> getParent()
    {
        return parent;
    }
    
    public double getCost()
    {
        return cost;
    }
    
    public int getDepth()
    {
        return depth;
    }
    
    public boolean equals(Object n)
    {
        return this.state.equals(((SearchNode)n).state);
    }
}
